Added proper unit testing to datastore