cleanup and reformating