organize events to it own class.

Signed-off-by: crynobone <crynobone@gmail.com>