Clean up and reformat source