Rewrote quite some code in the enrgylabels module.