Added better building of urls