added namespace for input, and set up input event listeners.