Wrap JS to clear global namespace