Added another constructor to obtain the current URL.
Added correct parameter parsing when creating an URL.