Code Cleanup phase 4