Lightweight object-oriented state machine with extensions
