Refactoring InStorageFlatRepository