remove some unused code & redundant debugging tools