simplified event handling and optional before & after frame buffers