fix unnormalized enumerate

also, a few cosmetic changes