Moved to template code.