Legend

Support for a custom formatter in legends, allowing arbitrary customization. Specifically, we are using squares instead of circles, and a test showing the behavior has been added.  Also, a full test suite for the legend model was added, and the navigation in the tests was made consistent.