Working on allowing arbitrary actions to be executed at each state.