Remove redundant lines