Began implementation of the monitor component.  Refactored state machine.