major code cleanup for joystick class.