Minor refactor: move code out of codegen time into runtime.
getting rid of pen-or-color references.