Split output update into separate functions.