Changes to allow RestAPI calls to Ajax code