HTML refactoring with Max