Move some js into run_js block to prevent caching of importent context data