Added terrible gamepad support and cleaned code