Speed improvements of dictionary class.

Decreases time to add all words by 0.5 seconds
Trying to make solve iterative. Currently mostly working but broken.