ui and event refactor...