First implementation of unit tests - partial coverage of Template.php