Refactoring of html