Refactored to render-client-hist-html helper func.