Setup state machine for LeapListener