Defined InputHandler in main thread