remove some mostly unused code