added scrollspy to nav menu

- changed nav links to point their href to the corresponding div id
- added cache of selectors for nav menu links and their divs
- refactored nav click event bindings into a single statement
- onScroll() now watches the scroll to update which nav item is active
- moved some things around in the main function and added comments