bug fixes, connection object, and new CLI interface.  @bkreider @srossross what do you think?