Added online_average and discard_input.