Changed to use the uri module