Added events to Sender and prepared for unit tests.
Some more unit tests