Version 2: Code Cleanup