Simplified the Chunk Generator code.