Optimized the chunk creator to be much faster.