used url.parse() instead of String.split(), changed unit tests accordingly