Added some comments to the directory code