cleans up directory structure and file names