Refactoring into separate files