Added URL and refactored exceptions somewhat