Factor out common initialization to a state initializer method
Factor out clearing of DataStore state to a method