Refactor EventHandler and DBHandler
Refactor EventHandler and DBHandler