Refactor file