Optimization on algorithm basis (switched to single-tree-search, multi-subpattern-search). Currently disregards combinators.
Added type declarations.
Added combinator check