Identity map refactoring and fix BinData tests