make the parser dyanmic in terms of key length/markov order
some formatting additions
minor changes
updated