Refactor crawlStore with extracting function.