Washington CNN  — 

When the final gavel came down to end the Supreme Court term on Wednesday morning, the Supreme Court press corps scurried to their computers to begin writing stories about a momentous term where the justices took a hard right turn on core issues and liberals found themselves on the losing end of more than a dozen 5-4 opinions.

And then, in a flash, Justice Anthony Kennedy announced his retirement, and everything changed.

It was likely the last thing the four liberal justices wanted to hear coming out of term where they lost on issues such as the travel ban,voting rights, workplace arbitration, public sector unions and immigration.

Whoever the new justice is will pick up where Kennedy left off almost surely will cast a more conservative vote next term.

Here are five takeaways from another blockbuster session:

Trump wins

The biggest win for the Trump administration came when Chief Justice John Roberts, writing for a 5-4 court, said that the President was within his authority when he blocked travel from certain majority Muslim countries.

Roberts said the travel ban fell “squarely within the scope of Presidential authority” under immigration law. And he suggested courts can ignore Trump’s prolific tweets.

“We must consider not only the statements of a particular president,” Roberts said, “but the authority of the presidency itself.”

The four liberal justices dissented, with Justice Sonia Sotomayor issuing a strong retort.

“Our Constitution demands, and our country deserves, a Judiciary willing to hold the coordinate branches to account when they defy our most sacred legal commitments,” Sotomayor wrote in a dissent joined by Justice Ruth Bader Ginsburg.

Conservatives prevail on unions, voter rights

The court dealt a blow to public sector unions in Janus v. AFSCME. It held that nonmembers could not be required to pay fees that go to collective bargaining.

The opinion will weaken the financial stability of the public sector unions at a time when membership in general is in decline.

In another 5-4 case, the conservative justices greenlighted one of the methods Ohio – a battleground state – uses to purge names from its voter rolls. Critics argued the practice amounted to veiled voter suppression.

And the conservatives on the bench said that foreign corporations could not be held liable in US courts for human rights abuses abroad. They also ruled against individuals facing deportation who sought bond hearings after more than six months of detention.

Punts on broad gerrymandering, religious liberty rulings

To be sure, conservatives had solid victories, but in three of the most high-profile cases, the justices avoided ruling broadly on the core questions presented.

Two of the cases out of Wisconsin and Maryland concerned maps that critics said amounted to extreme partisan gerrymandering. While the Supreme Court has set a standard limiting the overreliance on race in map-drawing, it has never settled on a standard to limit the overreliance on politics.

At oral arguments, court watchers thought that Kennedy might be working on a legal test that that would allow courts for the first time to step in and decide when states go too far. Such an opinion could reshape the political landscape and trigger lawsuits across the country.

But on decision day, the court took available off-ramps and dismissed both cases on threshold issues. Kennedy had neither slammed the door shut to future legal claims nor had he articulated a workable standard.

And in Masterpiece Cakeshop v. Colorado Civil Rights Commission, court watchers braced for a battle as the justices considered whether a baker in Colorado could refuse to make a cake for a same-sex couple’s wedding celebration out of objections to same-sex marriage. It was an epic follow up to the court’s 2015 decision that cleared the way for same-sex marriage and it foreshadowed a clash between LGBT rights and claims of religious liberty.

The court did indeed hand the baker a victory. But the 7-2 holding was carefully tied to the specifics of the case at hand and left unsettled the larger constitutional issues concerning whether businesses across the country could refuse services to LGBT couples out of religious objections to same-sex marriage.

By dodging core issues, many believed the court was papering over – for now – some of its deep divisions.

The Gorsuch effect

Trump’s first appointment to the court, Neil Gorsuch, continued to delight those who worked to put him on the bench, while liberal groups continue to argue his seat had been stolen from President Barack Obama’s nominee – Merrick Garland – who never got a confirmation hearing.

In Epic Systems v. Lewis, he wrote the 5-4 majority opinion holding that employers can block workers from banding together as a class to fight legal disputes in employment arbitration agreements. It was a big win for business and one of several victories by the Chamber of Commerce.

Normally, in an institution so steeped in the rules of seniority, new justices are sidelined for a few years and don’t get the plum assignments. But the chief justice tapped Gorsuch to write the Epic opinion, signaling a break from the norm and a possible alliance going forward.

Gorsuch also set out some markers of his own. Siding with the liberals, he voted to invalidate a provision of federal law that required the mandatory deportation of certain immigrants who commit serious crimes. But by casting his vote with the left side of the bench on vagueness grounds, Gorsuch was actually following in the footsteps of his mentor Justice Antonin Scalia.

Scalia often joined the liberals on the bench when it came to the rights of criminal defendants, particularly if the laws used to convict them weren’t clear.

Noel Francisco’s big year

Solicitor General Noel Francisco’s victory in the travel ban case was sweet vindication for the President who had seen lower courts invalidate various versions.

Francisco had a busy year. As solicitor general, he represents the United States before the Supreme Court, but his office also determines the appellate strategy for cases in the lower courts.

As the courts lit up with challenges to the President’s initiatives — travel ban, the Deferred Action for Childhood Arrivals program, sanctuary cities, transgender military ban – to name a few, the lawyers worked an unprecedented number of hours.

Solicitor General Noel Francisco

And Francisco, following a pattern that occurs when there is an ideological change in administrations, also decided to switch the Justice Department’s position in four cases.

His side won all four of them.

Former Solicitor General Paul Clement told an audience in June he thought that Francisco’s calculus had paid off noting the government did “pretty darn well’ in the cases Francisco had flipped.

The Trump administration also drew fire from supporters of LGBT rights for siding with the baker in the Masterpiece case.

“This Justice Department has already made its hostility to the rights of LGBT people and so many others crystal clear,” Louise Melling, the ACLU’s deputy legal director said back in September. “What the Trump Administration is advocating for is nothing short of a constitutional right to discriminate,” she said.

Francisco’s office also got in a heated debate with the ACLU in another case concerning an undocumented teen in US custody who sought an abortion. Francisco went as far as asking the justices to sanction the ACLU lawyers for some of their actions in the case. The justices sat on the request for months, and in another sign that they sought to diffuse tempers this term, they ultimately declined to issue any sanctions.