Code Cleanup
Final Version