Algorithm for calculating a single word is now working. Refactored around this algorithm.