Added localStorage factory.
Merged