added possibility to force keeping lines, also anonymize _ref param