[WARNING: The following story contains spoilers from Monday's episode of Castle. Read at your own risk.]

Richard Castle finally got his man.

On Monday's Castle, our titular mystery writer went into overdrive when he learned that Beckett (Stana Katic) had been taken as part of the duo's ongoing battle of wits with 3XK serial killer Jerry Tyson (Michael Mosley) and his disciple, plastic surgeon Dr. Kelly Nieman (Annie Wersching). But when Castle (Nathan Fillion) foolishly kicked in Tyson's front door and held him at gunpoint, it was he who ended up in cuffs.

Castle: Will Castle go too far to save Beckett from 3XK?

But after his setback, Castle decided to abandon the usual routine of police work and use his authorial talents to outsmart 3XK. Castle learned of Tyson's secret upstate hideout from one of Tyson's former cellmates, but after Castle tracked Tyson there, it seemed Castle had played right into his enemy's hand. However, Castle revealed he hadn't actually been working alone and in fact had lured 3XK into a trap — one that ended with Esposito (Jon Huertas) firing a bullet into Tyson's chest.

But Castle & Co. had no time to celebrate, as they learned Beckett was being held elsewhere by Dr. Nieman, who was prepping to steal Beckett's face for herself. Fortunately, the wily detective was able to free one of her hands and turn the scalpel on Nieman.

So is the 3XK saga really over? TVGuide.com chatted with executive producer David Amann about ending that story line, the impact of Beckett's brush with death and what to expect now that Castle's been reinstated at the 12th Precinct.

Is this really the end of the 3XK story?
David Amann: Well, we thought Jerry Tyson was dead before, and he wasn't. [Laughs] But we also felt that this is mythology that, given the insult committed here on Beckett by Tyson, demanded resolution and closure. So that's what we tried to give it.

Winter Preview: Check out all the must-see new shows

This episode featured a darker side to Castle. Will we see that continue, or was he just forced to that place by circumstance?
I think it's circumstantial to people that he's close to. You saw a bit of this in him in the two-parter when Alexis was taken. He was ready to do damage to people when the fate of his loved ones are at stake. The same is true here. This is his wife that's been taken. This is the love of his life, and so that's going to make a man do questionable things. So I don't think it's necessarily a change in his character. The circumstances required it from him, and his feelings for her are such that there's nothing that he wouldn't do to try to get her out of her situation.

Beckett perhaps seemed more rattled by the very violent means with which she stopped Kelly Nieman. Will that play a part in her story moving forward?
Amann: I think it affects both of the them in the near term a bit, but I don't know that it will manifest necessarily in future episodes directly. They've been through a lot of things, and certainly at the end of all that, there's processing that has to be done if you're Beckett. But I don't think that it's necessarily the kind of thing that's going to scar her or leave marks that won't go away.

On a happier note, Castle has been reinstated at the 12th Precinct!
Amann: One of the ambitions of the two-parter was to give [Castle] an opportunity to win his way back into the precinct — to do something that was unquestionably going to redeem him. But another thing that was interesting to us was Castle now had a taste of what Beckett must have gone through when he was missing. That is something that's going to leave a little bit of an impression on him, and something we'll revisit in a future episode.

I have to admit part of me thought for a couple moments that you guys were going to reveal that 3XK was behind Castle's disappearance at the beginning of the season.
Amann: It was talked about early on, but we always felt like those were two separate things. When we had conceived the end of last season and beginning of this season, we knew basically what the real story was. And so, when we got to the two-parter, it didn't really feel like it organically belonged with 3XK. So, for us, the pain of that story for Castle was really his experience of Beckett being missing in the same way that he had been missing. And we do think that will come back and manifest [itself].

Get scoop on your favorite returning winter shows

With Castle back at the precinct, is everything back to status quo or will there be some necessary readjusting?
Amann: Basically, no. I think Castle's tried the alternative version of working with Beckett as a P.I., and it's been sort of a mixed bag for him. This is really the way they're meant to be together, as far as both of them are concerned. For Castle's part, he's glad to be back on the team and will be on good behavior, at least for a little while, so he doesn't make himself unwelcome.

Gates almost seemed happier than one might expect to have Castle back. Will that relationship continue to soften?
David Amann: There's a softening of the relationship, but we wouldn't want it to soften too much. In Gates' job, she's a little bit of a taskmaster, and I don't think that's going to change anytime soon.

What can you tell us about upcoming episodes?
David Amann: Coming out of the two-parter is a fun, classic Castle episode. It's basically murder on Mars. There's a Mars simulation with astronauts who've been locked away in a Mars environment for six months, and one of them is murdered. But none of them could have done it — nobody could have gotten in. So Castle and Beckett have to put on spacesuits and go talk to people. And as part of that, we think that moving forward there is this kind of an ongoing theme for Beckett about what it is that she wants to do next with her life and her career. That's going to be something that manifests in the episodes moving forward.

And do you have a specific timeline for when you might re-examine the story of Castle's disappearance?
Amann: We'll revisit it in Episode 20. It's an episode that's going to deal, to a large degree, with Castle's missing time from the beginning of the season. It's fair to say that we'll get some clarity on what exactly happened to him, though we may not get the entire story.

Both of your leads' contracts expire after this season, and ABC hasn't made a decision about a renewal. How do those things impact your plans for the end of the season?
Amann: We're hopeful that everything gets resolved. In the meantime, we're just building the best end of the season that we can. Obviously, we've thought about a bunch of different scenarios, but our main obligation is to our audience and to deliver great shows. That's what we'll be trying to do, and we think we have a bunch of them lined up all the way to the end.

Castle airs Mondays at 10/9c on ABC. What did you think of the end of 3XK?