Make ranks-inv DRY
80 character line limit