Renamed Generator class to GeneratorX for php 5.5 compatibility.