Move all variables and functions into the init() function so that nothing is called unless the browser is supported and ThreeJS downloaded