Strip redundant lines