F1: Make code refactoring.

Refactored EventHandler and Logger.