Clean up output functions.