Fixing issue #14, implement sync version of REST endpoints