updating sample code in excercise 2

- DOM is now only updated once
- did not rebuild pdf/mobi, etc.

I did not run this code, b/c I couldn't find a TODO BB project that has this implementation (searched a while).
However I reviewed it and the BB and underscore documentation to ensure its correctness.

I also am aware of some code duplication which could be corrected, but didn't want to go overboard with the changes in this PR.