Refactoring of Menu handling