Modernize REMenu.m code