Remove unneeded negative test
Implement detection of all units in FSM search
Test for full match of a word, not for containment
Make onleaveEnd a single global function

TODO: clean up global variables into something more manageable.
Implement support for dash-separated matches