Refactor base html