API for XHR uploading fully functional - needs refactoring.