Refactoring html file