Configuration based tree sorting done.