Changed the JS environment to be on window so we can fiddle with it later.