Added a template for easier setup

Also modified the generator to allow field and index specifications