Improved menu handling in a small but significant way: the routing is managed by a single function now.