Changed the url processing from URI class to  URL class.