changes for 2nd joystick and cleanup