Split parsing of menus/config.txt to reduce duplicate code