Simplify joystick code