Replaced global variables with member variables of List object. Records no longer get removed from default space when changing space settings.