Fixed bug where :breached was incorrectly fired.
Cleanup.
Added tests for range-with-threshold example.
Cleanup.