various fixes.
speed improvements on menu building