Improved Mapper and FlatMap.