Cleaned up comments and the error message output when no "uri" is detected.