Added simple command line client.
Fixed a bug or two and tweaked the log output.