Add convenience methods for getting/setting state variables. Can be later extended into the system described in #306.