started to factor out restful stores to restful-stores.js