Removes unused variables and imports