Code cleanup. Fixed bug in mapped_region.c