Generator objects now allocate the object and the state in one malloc. This improvement fixes Issue #38.