Input handling implemented in separate class.