Moved to library style

- easy to wrap in any language; broker is now an object created
  via API rather than command line