added "has" method to Lookup and fixed a few bugs in AbstractLookup
Added the feature of detecting and reporting the duplicated key; Added more test cases and fixed the bugs along the way.