delete useless files & add javascript funcs