Made qpuasm.js work in browser and expose internals