Clean up and comments added.
Clean up.
Fix mmap in Linux.
Fix Linux build.