Added rest of template base code