A lightweight event-driven hierarchical state machine implementation in Objective-C.