Higher level IPC abstraction (fixes 238)

This is mostly refactoring.

Fixes #238.
:question: I thought we weren't using this docstring style anymore.