Connect UI and background logic.