Add more to template
Changes to yield a working generator