small tidy up of urls and variable declaration