Remove some unnecessary codes