a handful of bug fixes

fix offset, some code cleaning
remove some boilerplate
blog post adding functionality.  productionized index.js to not have debug code