This is surely not the way to do this. Also, The DeleteIMPIMappings function above is broken for the same reason, and I don't know what all the column names are going to be in that case, so I'm not sure the best way to fix this at the moment.