add legend, other misc fixes to analyst client