Cleaned up and now tested CLI app.

Also helped find a bug in the web archive indexing code.