Rearrange dependencies