Add type declaration to implementations
Add template stats
Port to new plug-ins