Refactoring into smaller files