Updated delete dirent, and also some minor deletions.
Update ref count logic