Better algorithm for choosing a candidate type.