Copied over stuff from the vehicle refactor... part 2!