Improved AI, refactored InputManager