Refactor and add HTML5/CSS3 support for pages