Remove some unneded code