Added support for label functions.
Code cleanup.
Implemented squashHistory().
Added clear button sub-menu item for squashing history.  Code cleanup.