Hacked apart CNEW. Conversion to templating begun.