Fix events
Add event tests
Clean up tests