(RMenu XUI) Cut down on code duplication