Added unit tests
Made event parameters optional