Updated state machine.  Added emergency stop function.  Updated LCD display code.