cleanup javascript