More refactoring in preparation for inline support.  We've now addressed the problem of 1 line vs many lines for a single mapping