refactor methods of UrlParse, eliminate some local varibles.