result from requests now contain original uri

also formating / jslint fixes...
fixes for DELETE remotely and localy

uri was undefined on multiple places, which failed with multiple issues.
Now uri reading is more robust.