Fixed up initial attempt at dynamic labeling.