refactored map search and freebase