Improvements to state/status handling