Menu links page 2

I don't really understand the suggestion about events - that doesn't sound link any existing pattern we use in core.

However, this patch makes the tree storage more or less not part of the public API, so we could try other approaches later.