Add a `Template\Base` class to centralize shared logic