Adapt clean dirs and reorder patches