Reorder dependencies