moving js files into separate file