Update to spec_gen.py