removes unused variables and use statements