[Warning: This story contains spoilers from this Sunday's Masters of Sex season finale, "The Revolution Will Not Be Televised."]

Things are looking up for William Masters and Virginia Johnson.

The second season of Showtime’s Masters of Sex, which chronicles the peculiar lives, burgeoning romance and pop culture trajectory of the real-life pioneers of human sexuality, ends on a hopeful note after taking them on a strenuous journey.

Following a stint in an all-black hospital, the pair open their own independent clinic. Bill (Michael Sheen) severs nearly all ties to his former career — he is no longer performing surgeries, delivering babies or operating a hospital, though he does continue as a fertility specialist and a gynecologist occasionally— to devote the bulk of his time to his real passion, the study.

One-time secretary Virginia (Lizzy Caplan) becomes even more involved with the research, continuing to participate by clandestinely meeting up with Bill regularly at a hotel "for the work.” The late nights away from her kids combined with her full-time job away from home enables her ex-husband to take majority custody of the kids.

Bill’s neglected wife Libby (Caitlin Fitzgerald) — who is often left out of the study’s daily operations and discoveries — begins to come into her own as her husband spends increasingly more time working (not to mention with Virginia). Libby’s dissatisfaction with her life rears its head when a newly found interest in the civil rights movements develops into an affair with Robert (Jocko Sims), CORE co-worker and brother of her former nanny.

As the characters evolve, so does the study itself, which begins to focus less on data collection and more on therapeutic work. In the finale, a CBS feature on their research edited out more than it left in, prompting Bill to concoct a plan — with the help of his longtime friend and mentor Barton Scully (Beau Bridges) and without consulting Virginia — to squelch the interview before it could air.

Creator Michelle Ashford talks with The Hollywood Reporter about the shift in the study’s emphasis, Virginia’s work-life balance dilemma, and the absent characters we can expect to return next season.

This season was a difficult one for Bill and Virginia, both personally and professionally. Why end on a positive note?

I had come across Kennedy’s inaugural speech and got very taken with the idea of the torch being passed. There was this swell of optimism that things were going to change. It felt like a hopeful time, and I thought it seemed thematically appropriate for what Bill and Virginia had been doing. They were going to be a part of that change. This whole notion of switching between collecting data and then going into therapeutic work is one of the most interesting things about what they did, and I felt like she really needed to explore that.

How much did the real life Masters and Johnson delve into the realm of sexual dysfunction?

If you go down to Barnes and Noble and look in the Sexual Dysfunction section, if there is such a section, they are still referenced all the time, and what they’re most known for is this sensate therapy. It was remarkable and revolutionary. We felt like it had to be as a result of the two of them really finding it together, so that’s how they became personally involved in this sexual dysfunction and how to fix it. I felt like that was the first baby step in what became really the part of their career that they’re most known for, which is therapeutic work.

Virginia is stuck in a painful custody battle over her two children with her ex-husband. Can we expect to see more of this storyline in the coming season?

One of the most fascinating things about Virginia Johnson is the relationship to her career ambitions and being a mother. You can’t pick up a magazine and not have women talking about how women have it all, don’t have it all, have some of it — and while it is a well-mined territory, it is an essential and important story and it was true to her life. She had a very fraught relationship with motherhood, especially dealing with the fact that she was a really ambitious woman — certainly in that day that was frowned upon. Even now I think being ambitious as a woman is considered unseemly in a certain way, not as much, but still it’s a very curious relationship.

Then when you put children into it, all sorts of judgments come up, and that is a still very, vey active subject matter now. The good thing about this story is that it shakes her to her core, that her choice of a career has very serious repercussions. That was true because in real life Virginia Johnson’s children had a tough time with what their mother did. When people knew what their mother did, it made them slightly ostracized in a way. It’s just the first beat of that story though. It’s hardly over. Next year we can also make her children older, and I hope that helps us tell really interesting and complicated stories about what women really have to do to pull all this stuff together.

We see Libby go through possibly the greatest transformation of any character this season. Why did you take her on that journey?

The most satisfying scene to write was Libby telling Robert what she actually knew to be true about her life. It seemed like a cathartic thing to let her look at her own life very clearly and share it with us. I was happy about that scene once it was finally written, and I was glad that we got led into her process. That also came about by talking to the actress as well, who was struggling with it. Caitlin is very, very smart. She said to me, "I just can’t be dumb. I don’t know how to do that," and the last thing I would ever want is a dumb woman so I said, "I get it." This seemed true to the actual woman who must have on some level known what was going on. The question was always: how much did she admit to herself? We have very little information about her, but the information we do have, it seems like every once in a while she would look around and say, "Oh well, I know what this is," but just made a decision to keep the peace. All that informed where we ended up with Libby.

What prompted the twist in the finale and Barton Scully’s surprise return? Can we expect to see him regularly next season?

When we started to do research, we realized that there were a lot of people doing this work and they were not the only ones by any means. So then the question becomes: why them? What was it about Masters and Johnson that captured the public’s imagination and made them the face of sexual researchers? We wanted to introduce the fact that they’re not the only ones out there doing it so that in the future we can see what it was about them that made it just stick for some reason. We thought to put Bill in a bit of a crisis about it, and that if he couldn’t talk to Virginia about it, he'd go to Barton. It was also the perfect opportunity to bring him back because we felt unresolved about the fact that we had literally left Barton hanging. We thought it would be great to touch base with him so we know he’s trying to pull it together.

Barton and Margaret (Allison Janney) will be a part of world permanently. The question is just how are they going to come back and what form. One of the things I know for sure about this show is it is one of those where people will weave in and out over the years. Storytelling-wise it’s actually very fun because it challenges us to get really creative about how that character can come back.

Which means we’ll see more of Barbara Sanderson, too.

We loved Betsy [Brandt]. It was a very fluky thing how she ended up being cast as Dr. Greathouse’s (Danny Huston) secretary actually. The role was very small, but she loved the show and we loved her. It was a weird thing that she said, "I’ll just do this little role it’s fine." Then when the press got wind of it, and they were like, "Oh my God, you’ve cast Betsy Brandt. What’s her story?" All of the sudden I got this really uneasy feeling that everyone was going to be really disappointed when they realized that’s all this role is. Then when she was with us, it was such a lovefest that I knew we had to figure something out and bring her back. Same with Sarah Silverman’s role. We don’t want it to go, and I think she’s game for coming back.

History tells us that Bill and Libby eventually divorce. Will we have to say goodbye to her character when that happens?

I actually don’t think that will be the end of that character at all. One of the very interesting things about divorce is that it’s almost impossible to get divorced, especially with children because that person really never does entirely go away.

You had to fast-foward through time a bit this season to hit the career milestones in Bill and Virginia’s lives that you wanted to emphasize. Will you have to do more of that next year?

We'll be doing more time jumping for sure. We have to because the next big milestone in their career was publishing their book and that was in 1966. We’re in 1961. Once they publish that book, then the story goes off on a wild tangent because they become famous. That’s a whole different thing, and all that stuff is really delicious. We don’t want to put that off too much longer so a lot is going to have to happen.

How do you maintain the pace of the series, which is slower than most other television shows today?

I was at a restaurant recently, and my waiter was talking about how much he loved Walking Dead, and then somehow this show came up and he was like, "It’s a little slow." We’re just not going to appeal to everyone. I found this year to be really complicated in terms of laying it out because the material felt really dense and really involved and many times very internal and psychological. There was such emotional excavation. There were times where I thought, "Oh my God, what have we done here?" And yet in a weird way this stuff takes on a life of it’s own.

We’re not for everybody, that’s very clear. This kind of storytelling requires commitment. You have to settle into it and decide to go on the ride. It’s not always going to be pleasant and it’s not always going to be fast-paced. God is in the details in this one. But the most gratifying thing is that the people who do like us seem to really like us. If they get what we’re about, they really go with it.

Email: Bryn.Sandberg@THR.com

Twitter: @brynsandberg