Wrap client_rendering.js in a function