Fixed event struct definitions
New version of the API, more complete, less locks