Adjusted templates based on new type system