Finishing basic data structures with templates