Moved javascript into separate function. It works! Can get a word cloud from a completed hit. Need more people to try it so it can actually be a cloud.