clean up and reformat