Aggregate tmpl and map functions in their own .c/.h files

Rename all 'vpt' references to tmpl