Optimize returned HTML