Add the output line and clean up the data slightly