Saravanan/DD - cleanup javascript