Menu code cleanup