add tests, begin refactoring to support multiple datastores, readme fix