Cleaned up a bunch of code and fixed leaving confirmation and other
little things
temporarily remove the confirmation, because its annoying, until I get a
better version up.
Changed target url of documents api back to the API.