Added inputmanager and made some small changes