Cleanup on format