How do Templates and Sequences work?