Couple of changes as wasnt working on my machine.  closing if args in 3 of the 4 fetch methods and changes to the way in which the url is constructed