Move state into backend.