Add nuget package restore
Add maximum messages parameter.

Better exception handling.
Add HeaderError/BodyError.