cleanup globals from polluting js namespace