Merge with Steve version. Directory listing optimization not completed