merge 065f468, optimise performance by only initialising states on
startup
optimise performance by only initialising states on startup
optimise performance by only initialising states on startup, general
performance, cleanup
Merge pull request #777 from davherrmann/issue#776

Issue#776: Optimise performance