Typo found while testing
Refactoring code and using redis.  inserts working for state stats.