Reject long URIs

Implemented suggestions from Dimitris and Jona in #42