Fixed up a lot of issues in the server side code for workitems & synch #41;  #4;