Allow connection details to be passed in.
Fix url setup.