refactor StorageManager and StorageManagerTest.