Finite-State machine

Rage against the state machine