some of Nick's cleanup