fixed templates, other base code