Modified vector.js to use array internally