we now read the theories into the generated model, also changed NULL to NIL