Remove redundant list elements