Joe Biden needs to do something about the Department of Homeland Security.

There will be no shortage of items competing for attention on the president-elect's agenda when he takes office in January. Dealing with the pandemic and the economy are the top items, obviously, because they constitute an emergency, but there is also the question of trying to undo the considerable damage President Trump has done to the government itself during his four years in office.

The problems of DHS fall in the latter category.

Even before Trump was inaugurated, the department all-too-often proved indifferent (at best) to human rights and civil liberties, but over the last year it has shown itself ripe for abuse by an authoritarian-minded president. Biden probably won't be that kind of president — certainly, not to the degree that Trump has been. But DHS needs reform, not just a nicer person at the top of the organizational chart.

This was most clearly demonstrated during the summer of "Black Lives Matter" protests nationwide, following the death of George Floyd in Minneapolis. Stymied by opposition to using the military to put down the demonstrations, Trump instead sent DHS agents into the streets of Portland, Oregon, to snatch up protesters — driving around in unmarked cars and camouflage uniforms, grabbing people without explaining why they were being arrested — and used aircraft to surveil BLM protests nationwide in places like Buffalo, Philadelphia, and Dayton, Ohio.

"The deployment of drones and officers to surveil protests is a gross abuse of authority and is particularly chilling when used against Americans who are protesting law enforcement brutality," House Democrats said in a June letter to Chad Wolf, the DHS's acting secretary.

Even before this summer's demonstrations, though, the Trump administration was using agents from Immigration and Customs Enforcement, a DHS agency, to keep tabs on protesters opposed to the president's immigration policies. Under Wolf, the department withheld a report on a Russian disinformation effort against Biden's campaign, and sidelined attempts to address white nationalist threats to the country. As I wrote in July, U.S. Customs and Border Protection — also a DHS agency — has a yearslong history of corruption, racism, and a casual toleration for the deaths of undocumented migrants.

There is also reason to believe DHS is just not that good at its job. The Brennan Center for Justice has pointed out that legislative criticism of the department's effectiveness go back at least to 2012, when a Senate subcommittee found DHS "often produced irrelevant, useless, or inappropriate intelligence" about threats to national security.

And we haven't even mentioned the kids in cages, yet. Or the hundreds of migrant children who have been separated from their parents, who cannot be located.

The department is a mess, in other words, a stain on the American conscience.

It will be useful not to have people like Stephen Miller in government, no longer influencing the president to govern with cruelty. And Biden's nominee to lead DHS, Alejandro Mayorkas, has been welcomed by immigration advocates. That's the good news.

But DHS' problems are too widespread and enduring — and presidential terms are so short — that it isn't enough to rely on a personnel change. Structural reform is needed.

Because the department has been so bad for so long, there is no shortage of ideas on how to fix it. The Center for American Progress, for example, issued a report in September recommending reforms that included budget cuts for ICE and CPB, new restrictions on the jurisdiction and authority of DHS agents, and increasing the power of oversight bodies to investigate abuses — and the power to rectify them. In May, the Center for New American Security also advocated improved oversight of the department. Some critics have called for the department to be abolished altogether. And why not? The department has only existed since 2003, created in the first fear-driven years after 9/11. What can be made can be unmade.

That probably won't happen, if for no other reason than politicians don't want to be seen literally voting against "homeland security," no matter what the details of that vote would actually mean. The issue is just too easily demagogued. But reform should be possible, and is necessary. The Department of Homeland Security, as it currently exists, has revealed itself to be a danger to traditional American freedoms, a tool easily used by a wannabe strongman. Best to act now, before that tool gets into the wrong hands again.