Refactored StateHistory