Various fixes and allows more variations of urls.