refactored into MenuItem and MenuWidget classes