Solved B, working on A.

 * B (2013-04-22)
 * A (2013-04-25)
both are Aho-Corasick implementation problems

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>
OH FOR FUCKS SAKE

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>