refactor all the files