Added localStorage functionality.