Templates for Data Abstraction