Rearranged container tree so it is not queue based