Simplified the buttons and joysticks routines