Add template stats
Port to new plug-ins