Refactored source file structure