Not gamepad support example yet, just short refactoring.

Refactoring of the mess we have right now.
Damn! It is messed up code!