Improve menu handling