Reordering dependencies