Reworking storage.js