Added tests for instantiation of InstructionMap. Fixed bugs related to instantiation