Templated states, added switch