Simplify a few constructs

* ran `go fmt ./... ` in order to contribute easier (I would suggest to run this before commit/push)
* removed dead error cases by simplifying type switch.
* simplified URL builder.

Feedback welcome.