Added improvements to the HTML engine