Remove some dead codes