Added ordering to layers that are added to the viewer.