Updated at 3:36 p.m. ET

President Trump swore in his new chief of staff Monday morning, former Homeland Security Secretary and retired Marine Gen. John Kelly, telling reporters he has no doubt Kelly will do a "spectacular job" in his new role.

Kelly takes over from Reince Priebus, former chairman of the Republican National Committee, who left the position after a little over six months, unable to bring order to a chaotic and at times fractious West Wing.

Hours after Kelly stepped into the roll, the White House announced Anthony Scaramucci would no longer be communications director.

"Mr. Scaramucci felt it was best to give Chief of Staff John Kelly a clean slate and the ability to build his own team. We wish him all the best," said press secretary Sarah Huckabee Sanders' statement.

The changeovers follow one of Trump's worst weeks in office so far — and not just because of Scaramucci's foul-mouthed rant in which he belittled the former chief of staff, followed by Priebus' resignation. The Senate was unable to pass a plan to repeal and replace the Affordable Care Act. GOP senators rebuked Trump for his criticism of Attorney General Jeff Sessions. And the president's controversial speeches before the Boy Scouts and police officers were followed by criticism from Boy Scouts and police officials.

Trump, however, said Monday morning that things are going well for his administration. He tweeted, "Highest stock market ever, best economic numbers in years, unemployment lowest in 17 years, wages rising border secure S.C. No WH chaos!"

As NPR's John Ydstie has reported, the stock market's rise is likely attributable in part to Trump, but there are other factors at play, like faster global growth.

Kelly is highly regarded by Trump, who said what Kelly had accomplished at the Department of Homeland Security "is record shattering." Trump said Kelly got "tremendous results" on border security with "very little controversy." There has been a steep drop in border apprehensions during the administration and an increase in arrests by Immigration and Customs Enforcement.

Kelly, formerly in charge of the U.S. Southern Command, was confirmed as Homeland Security secretary with bipartisan support by the Senate, 88-11.

In a meeting with his Cabinet after Monday's swearing-in, Trump predicted Kelly will go down as "one of the greatest ever" chiefs of staff.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.