A state machine implementation written in Objective C.