Removes superfluous globals