Reorganize template parts. Resolves #16