Refactor out state update
Oops