fixes some problems with the message exchange
fixes some coding style issues with the worker; adds prefixes to zmq-specific functions
adds some comments
cleans up client api
cleans up the broker and fixes possible errs