Generated JavaScript now uses a buffer array

This allows if / else statements and much more :)