Added events handler
Updated comments