add some legends, clean up HTML