Added use of tripairs, updated filtering regex, and updated markov method