Extracted common storage manipulation code into helpers file