Turned word_chain into a class