Url parsing

Here it is, passing tests and everything.  There's still room for improvement with handling invalid characters in URLs, but this should be good enough for now.