massive refactoring to rename files and sort them