Refactoring code to separate out a function that does the work and another piece that handles command-line parameters.
Now supports specifying your own API key in the file api.key.