some fixes in terms of map

Mainly, make a intermediate function to get the keys we want. 
"completeTagInExtDecl" instead of "midCompleteTagInExtDecl"