Clean up code.  Continue to fix input event listener.