Added caching to localities during import.
Updated locality lookup logic.