ChunkTransformer refactored