Some work on making Mapper faster

Some work on making Mapper faster