More efficient menu code