ADD tm sub-package
ADD testcase for MatchTokens
MOD order counting algorithm
MOD move some funcs to tm sub package