minor adjustments for better portability with browserify