Reworked menu generation/contextualisation, allowing it to happen in a single step. Closes WS-79.