Codebase cleanup