Moved input code around, fix for digital joystick input