Refactored car code