Refactoring of storage service