This will need to be cleaned up if we do not need to create the missing parent array. I left this code here just in case we do need it.