Updating WordCount example to have a main() so it can be run simply via command line as well