Refractoring handler and eventdetails