Decoupling storage objects and removing duplicate code