Add URL checking and protocol fixes (#43), improve input checking and error response