some template introspection clean up