html fixes, along with legend scaling