WIP: Please revisit this commit.
Lots of changes, mainly related to making error messages propagate over
the network interface.

Damn you, Golang!