improvements to mapping generator