Fix template regenerations.
Remove obsolete TODO.
Inline templates for common modules, closes GH-34