added the event chunk framework. What a .... nightmare. But now it works. Cleaning up the code next.