Tied a few loose ends

Removed traces of an old global variable.