Update generator after finding some bugs
Add generator for spec tests