added some new modules and a lot of refactoring, breaks compatibility with the datastore v1