remove reduntant js code