uncommited fixes and add versionedstore unit test