Added proper window closing
Switched from JSAPI to FreeTTS directly