refactoring and organizing files