Add Aho-Corasick algorithm and other minor changes.