Removed unneeded globals