Add keyword management, refactor event handling to keyword-driven.
Add keyword management, refactor event handling to keyword-driven.