Rearranges the file structure