Move menu_context.c code into driver.c