Fix 2 wrong template names
Clean up a few bugs in templates
Add more precise type info in method signatures + make template generator more robust
Merge pull request #1899 from ussuri/new-project-templates

Follow-up for "New project templates"