restructuring codebase