Add optout store logic and tests