General cleanup.

Factor out the common styles.
Factor out the common checkbox click handling.
Use += to construct the HTML for the infowindow
Inline some event handlers.