General codebase cleanup