Codebase restructuring