added datastore.js as data/network abstraction layer