Revisions to chapter 8 exercises

Completely reworked JS in both exercises based on feedback from
reviewers. Significantly reduced complexity and amount of code required
for the toggle buttons.