Factor out menu creation