Filled out a good portion of template generator.