Started on state refactor