Minor changes.

Also templates and things