Code Cleanup Phase 1