Cleaning up JS global namespace