Added Input handling for keyboard and mouse