Implement protocol in API server

- Update the "status" component of API responses to denote "success" (rather than failure).

- Clean up the error type.

- Catch errors raised in server and return them to the client.

- Add basic client and server (hacks) to demonstrate these changes.