Remove all globals from api