path remembering car

If I delete that line wouldn't I lose the information of the right wheel encoder?

Yes. You can't have everything, though. Not on a 328 based Arduino, anyway.