Added unit tests
Added support for async events