FBI Director Christopher Wray is making changes to his senior leadership team, as President Donald Trump has continued to attack the bureau for perceived biases against him and has been calling for a shakeup at the top.

Officials said Tuesday that Wray, who started the job in August, is replacing two top aides who were promoted into their roles by his predecessor James Comey. Such changes are not unusual when a new director takes change, but they are notable amid Trump's public pressure on Wray to get rid of officials who were confidantes of Comey, who was fired by the president in May.

The Justice Department confirmed that Dana Boente, the outgoing U.S. attorney for the Eastern District of Virginia who has also been acting as head of the department's national security division, will become the FBI's general counsel. He replaces James A. Baker, an ally of Comey's who was reassigned in December.

Get Breaking News Delivered to Your Inbox

Wray said his chief of staff, Jim Rybicki, notified him last month of his decision to take a job in the private sector. Zachary Harmon, a former Justice Department official who also worked with Wray in private practice, will be taking Rybicki's place.

Trump's blistering attacks on the FBI have proven a tough challenge for Wray in his first months on the job as he tries to make changes while maintaining public confidence and restoring bureau morale.

Wray, a Trump nominee, has faced relentless criticism from Republicans over perceived political bias in special counsel Robert Mueller's probe of possible Trump campaign ties to Russia during the 2016 presidential election, as well as in the handling a year earlier of an FBI investigation of Hillary Clinton's use of a private email server, which ended without criminal charges.

Trump has been especially critical of Deputy Director Andrew McCabe, who plans to retire from the bureau in March. McCabe's supervision of the Clinton's email investigation came under scrutiny because his wife's Virginia Senate campaign received contributions from Clinton ally Terry McAuliffe's political action committee.

The president fumed again Tuesday over text messages involving an FBI agent who was reassigned from Mueller's investigation following the discovery of anti-Trump messages he had traded by phone with an FBI lawyer.