Cleaned up the WordCloudGenerator code a wee bit and added a couple more unit-tests.