REST updates for schema changes

Changed REST functions to work properly with database schema changes and new procedures.