Remove some legacy unused code