Refactor html to use directives.