Remove JS hook and install hooks