changed var names from blahPath to blahUrl where appropriate. Bit of tidying too.
changed js config back to point at local version of api.