Code Analyze and Cleanup