Worked on depth sorting.