add hook to ac-js2 , adjust location of cleanup function in initial