Clean up on format