Simple state "machine" builder