Moved code, added chain/chainlink, like word/sent

Chain is an abstraction of a sentence but for markov chains, while
chainlink is of word with a few more details.
Cleaned up / fixed word and its unit test