More extensible tagging, move legend out