Rewrote generator and generatorConnection to use XMLHttpRequest without changing interface