Refactor main html