Improve generation of url.