The Router currently uses arrays to track the open listeners and requests.
The underlying AppCookie is used for both listeners and requests, distinguishing them by the inner value.
Other data structures and a different way to map the handles (AppCookies) might be better in multiple ways (readability, efficiency, ...).
For the listeners for example, a Map from MsgType to AppCookie might be a solution.