redid indirect map code, emr issue? some refactoring and renaming too