Remove redundant filtering code