Fixed overwriting of a variable, html output is now slightly more verbose.