Implement accessors for state.
Minor cleanup.