Implement init() and chunkComplete() methods. Cleanup.