refactors some sort of files