Added chunking and put some exception handling around the requests.

...hrows an exception and added a chunk size. It's kind of ugly so pointers welcome.