Added Markov handler using linked lists