improve specs, work on error handling

It should be impossible to not specify the endpoint. The user should explicitly set the endpoint to something, or get an exception. That way he doesn't accidentally use the wrong endpoint (this has happened, sadly).