More tests, cleanup for code generator, switched to mechanism for creating unique generated identifiers