Added multipart requests and proper handling of files.
Cleaned things up a bit and changed request to a post rather than a get.