HTML5 theming refactor and CSS optimization for the functionality.