Added abstract finite state machine.