Removing commented out code, and unused key variable