Update win.js to include the Template class