Refactored build_car function to Car class