Remove some unused codes.