Refactoring html highligther