Abstract aho-corasick into separate class.