Added the VehicleFactory and removed code from Main to createVehicle method. Code is now refactored