Some comment and logging fixes.
Added a docopt parser.