Convert output to HTML
Clean up markup builder code