some improvements to render_body_server.js for my code editor prototype