Code base refactoring