Trying to clean up the chart divs; better, but not perfect
initial implementation of close button (not fully functional), also fixes #384
minor refactor of event registration; fixes #382 #375
mussing over minor merge conflicts; also fixing #376