Added event support, added an example of buffers and events