Added control finite state machine, v0.