remove and update useless code.