Added state parameters for callbacks.