Refactor Storage Codes