Made all static refs to store, database etc. relative. Now should be possible to work with different stores.