fix to click handlers, spacing, and minor editing