Reorganizes directories.