Moved response handling to middleware.
Configure some middleware by default to make the client semi useful.