Final commit. Some state machine updates.