Improve HTML generation