remove some unused code, remove redundant exception declarations