Fix parse buttons, modified joystick protocol and add joystick code