Clean up output code