Scripts and messages.

Created a set of global variables holding messages that are used in
more than one protocol. That way they need only be changed once.
Standardized the sequence of events in each of the main tasks.
Too many events.

The routines that run the LEDs to achieve a desired force were
generating too many events.