Improved directory ordering