Refactor vehicle match logic