Reworked, stack-based state machine with a "mouse" who is afraid of the mousepointer