Applying menu styles in the right place and removing orphaned styles