Refactored code to allow for different types of gamepads.
Preparing for HID Joystick mode