commented variables related to prev/next buttons
code cleanups
fixed issue #22
changed alert() calls to console.log()