Differentiate between ascending and descending thresholds.
Differentiate between ascending and descending thresholds.

This also includes a refactoring of the command execution code to use channels
and fix some bugs.

geo-data/nicer,geo-data/nicer