Templates and weighting
merged from master/removed test templates