Add event handler
Add event handler test case
Optimize client tests