vehicle refactor and tests