Update for new changes to make this not such a memory pig