refactored code files