Change storage to use JSON rather than just string