Improve how GridControl manages the template

Fixes #381
Fixes #384