Rewrote to using sessions to carry generated code into the external js-returning file