factor out event ports for ui core