Refactoring this file