issue1208 adds some questionable `mutable` and `const casts` that would fall under this issue: look for "issue1227" in the code after 1208 has been merged.
We generally want to untangle the dependencies between the classes and how they call each other. One aspect that could potentially be improved is the two-level lookup of per-state information.