More meaningful error message for max(ev) > max(cpt)
Initial commit of weight classes functions