Initial support for template-declarations.

This is very WIP.