refactorized for being able to use in the Browser; use DataViews instead of Buffers
removed old browserify legacy code