Improved naming in function trimUrl.