changes to js file loading

seperate js file now