Simplify theme function and allow for theming of codes that have a broken reference.