Refactor client-side `render` wrapper.
Move template render helpers into `env.helpers`.