Refactor to HTML5 standards