remove definitions of unused variables