Implemented map type via pair

Had to change binary() a bit to ensure it returns the matching key,
not just the index of the new key.