Rewrite storage to get rid of multiple issues

Change-Id: I540886ca642dcdaa2cdcaf7d89866394dbcf228e
Merge "Rewrite storage to get rid of multiple issues"