Generating sets of variables, prototypes moved to header