Removed mmap stuff due to compile problems on Linux/Windows.
Small changes to work around compilation failures.