Sort directory entries, remove debug print statements