Reading and Writing to SharePoint with the Javascript API