Refactoring

Changed the hardcoded windows variable in windows.js to ease later
integration.