Restful groundwork working (hopefully)

Fixes up the restful service to the point where it should now work.