Added reference to the container holding a list item to the list item ($parent) and now when deleting an item it defaults to remove it from the containing array