Added functionality to sort folders