Move server call wrapper functions to sparkl.js.