Finished first version of word generation.