Remove unused variables, adjust filter.