Refactored the config array, tidied up a few bits
added the current url to what gets sent to the server
Merged
jeez reworked so it actually works. Note to self: write tests so people can at least try and submit working pull requests.