Rearrange dependencies.