Final working custom energy applet.