Made html output more consistent and less error prone.