clean up 'id' and 'name' rules
reformat and gen