split out CallState and add some comments