Remove rv and trailing whitespace