Simplify enum lookup generator