Adaptive menu and code reformat