factorize menu + bugfix import