Added ability to turn legend off