Remove obsolete template code