Added unit tests and made some minor change to Url classe