Updates to map switching code. Renamed some tables, added missing definition tables, added inejctor scalar hack, and added hack calls to main routine for monitoring.