fix context initialization, per jukka jylanki
reduce generated code size a bit in the hopes of getting either -O2 to work in emscripten or chrome to run the demo