remove some unused variables/code