cleanup functions pointers.

Start to rewrite readdir callabacks.