Removes lines that became useless.