Most of GUI and state machine complete.