Silicon Valley's first season ends with big success: A huge win for Pied Piper at TechCrunch Disrupt. Its second season ends with serious failure: Richard Hendricks is ousted from his position as CEO at the company he founded. But last night's season three finale lay somewhere in between, putting the team on a more independent track and with a more accidental — but all the more promising — vision for their company as they proceed.

To recall where we're at: While installs of Pied Piper's platform have been great, daily users were severely lacking, and with money running out and a potentially high profile failure on their hands, Jared desperately purchased users from a Bangladeshi click farm. The ruse doesn't get dragged out: Richard immediately reveals that he knows about the fake users and that it won't matter anyway, because the company is going to fold regardless. However, here's the twist: A newly reinvigorated Erlich is coming into his own as a PR head. He explains, in a brilliant, fast-paced speech, that he's played a bunch of venture capitalists off one another to convince them, based on the uptick in fake users, to provide a Series B round of funding to Pied Piper. A sample of his language: "I was at the Rosewood for lunch — I mean it was the lunch hour, I was there, I wasn't eating, the usual..." Anyway, after name dropping everyone from Marc Andreessen to Vinod Khosla, Erlich announces that Coleman Blair Partners would like to offer Pied Piper a $6 million round at a $60 million valuation, putting them back in business.

Naturally, that leaves Richard and Jared in an ethical bind: It would be fraudulent to represent the company as growing based on daily active users. But as Richard justifies matters "It's not we're lying about it like fucking Theranos." Quick to discover the duplicity are Dinesh and Gilfoyle, who in a lovely wink and nudge routine explain that they've helped cover the fake users' tracks but don't want to be implicated in any way. "Whatever you did or didn't do," says Dinesh, "that was some serial killer level shit." Adds Gilfoyle: "I think I finally respect you as a CEO."

Returning to Hooli, a reinstated Gavin Belson is paying the piper for his most recent live animal display, an ongoing gag that hasn't really made much plot sense, until, debatably, now. The elephant, an endangered species, keeled over and died on Hooli property: We're told it was rescued from the circus but actually very depressed because it loved performing. "You always said that here at Hooli, in order to achieve greatness, we must first achieve goodness," Belson's subordinate tells him. "I was a bridesmaid at Sean Parker's wedding when he handed out live bunnies as plush toys. That wasn't goodness. That was badness. So's this." Of course, Belson fires her and has the elephant's body lifted by helicopter and dumped in the Bay. The spurned subordinate reports the behavior to that blogger, CJ, who's publication, Coderag, is now owned by Erlich and Bighead. CJ confronts Belson with the story, and he does exactly what Erich did: Buys the blog, this time out from under Erlich, to kill the story.

Laurie Bream and Raviga, Monica included, are already furious that Richard and Erlich are shopping around by the time the Pied Piper CEO and PR head swing over to the meewith Coleman Blair. It gets worse from there. Richard can't keep up the lie up and confesses that the daily active users are fake, infuriating Erlich, who had no idea. This is the maddest we've ever seen him, and it's the end, it seems of their friendship. Word gets out quickly about the fake users, and soon Erlich and Richard are at a board meeting with Raviga where Laurie is ready to put the company up for sale.

The highest bidder? We assume, based on a previous scene picturing an encounter with Laurie, Belson, and Jack Barker, that it's Hooli. Belson's offered to pay $1 million for it — an incredible, insulting steal that will mean Hooli won the compression war after losing every battle. The scene in the Raviga board room is bizarre and fast-paced: Monica refuses to agree to the sale, and so, for that matter, does a totally random other Raviga dude because, he claims, he's in love with Monica. It's high drama and hilarious because who the fuck is this guy, but anyway, it doesn't matter at all because Laurie is going to get her way and Richard is totally defeated and basically plays dead.

Except: Twist again: The sale is not to Hooli for $1 million but to a higher bid (by one dollar) from "Bachmanity," the VC firm of Erlich and Big Head's creation that, with the $2 million sale of Coderag, is back in action. This turn of events unites pretty much everyone, even bringing Big Head and possibly Monica, who may have been fired, back into the fold. While Erlich gives Richard a stern talking to about how he'll have to earn back his trust, but then we cut to the team celebrating together.

So, what's next? In its final moments, the episode gestures at a number of possible changes like a pivot to Dinesh's video chat, which has organically been picking up followers, inspiring Big Head and Erlich to buy Pied Piper in the first place. Mostly, what's next is more to look forward to: This was such a weird, fun, intricate episode, one tying together seemingly mundane elements from the whole season. Even Jian Yang has a funny line to cap things off, prank calling Erlich "from the future." What's really ahead? Sadly, we have a long wait to find out.

Previously: Silicon Valley Ep. 3.9: 'Pipey'