Input handling works mostly