Cleaned up generator.