Refactoring so no uiEventCallback variables are needed, events now handled statically