AMD: split window.js into three separate files
Merge branch 'window-js-split' into dev