Split code into multiple files
Added modes for keyboard, gamepad, tablet and touchpad interaction