Reorganize event structs and functions close to each other.
Improve event signatures to each return a result.