Several fixes for the legends panel (indentation, codemirror config, help tip, etc.)