Remove some unused code and declarations.