Remove some legacy code