factored out response model, R/C code a bit, and started on updating state synchronization between R and C