Fix state being on class. Consolidate instance vars into a single atom.