Modified pe1.js to be v8 friendly