init input manager + misc refactorings