Removed some legacy references so that this function works
Removed some legacy references so that this function works