Removed uneeded globals