fixed bugs in rest calls; create/update should work.