Minor changes to events.rb and more unit tests for events