minor cleanup, and fix a bug in which a struct definition is re-defined elsewhere in the program