It started out as a great idea: The war had liberated nearly four million slaves and destroyed the region's cities, towns, and plantation-based economy. It left former slaves and many whites dislocated from their homes, facing starvation, and owning only the clothes they wore. The challenge of establishing a new social order, founded on freedom and racial equality, was enormous. The Bureau of Refugees, Freedmen, and Abandoned Lands (usually referred to as the Freedmen's Bureau) was a U.S. Federal government agency that aided distressed refugees of the American Civil War. The Freedman's Bureau Bill, which created the Freedman's Bureau, was initiated by President Abraham Lincoln and intended to last for one year after the end of the Civil War. Passed on March 3, 1865, by Congress to aid former slaves through education, health care, and employment, it became a key agency during Reconstruction, assisting freedmen (freed ex-slaves) in the South. The Bureau was part of the United States Department of War. Headed by Union Army General Oliver O. Howard, the Bureau was operational from June 1865 to December 1868. It was later disbanded under Lincoln's successor, President Andrew Johnson. The Freedman's Bureau spent $17,000 to help establish homes and distribute food, established 4,000 schools and 100 hospitals for former slaves. This Bureau also helped freedmen find new jobs. At the end of the war, the Bureau's main role was providing emergency food, housing, and medical aid to refugees, though it also helped reunite families. Later, it focused its work on helping the freedmen adjust to their conditions of freedom. Its main job was setting up work opportunities and supervising labor contracts. On the negative side, it soon became, in effect, a military court that handled legal issues. By 1866, it was attacked by former Confederate leaders for organizing blacks against their former masters. Although some of their subordinate agents were unscrupulous or incompetent, the majority of local Bureau agents were hindered in carrying out their duties by the opposition of former Confederates, the lack of a military presence to enforce their authority, and an excessive amount of paperwork.