Improve state maintenance