replace basis menus with panels; some refactoring