Generator cleanup. Fix #55