Start of fixes to ensure that mappings do not need to be specified with the exact case, needs some tidying