Refactor to get ready for key addressable storage