If you follow Baruch and Netwalla towards a state machine with bool xformation matrix and your form code for the
'edge' functions, you might find these worth looking at to help build it.
The best advantage to going down this road is _not_ to simplify your code. It is removing
the state transitions from the code altogether, no hardwired logic code, just a conf file of
transitions.
Math::MatrixBool
StateMachine::Gestinanna