Added gamepad support

- Gamepad support added
- refactored some of the movement code