Refactors
Fix a datastore issue and further impementatin of testenv