Corrected state machine, added actions to each state machine. Fixed sound class, added led class, added some security checks to motor class. Tested.