added application events handler and fixed all examples