Sorting the branches galleries