Refactor customer.rb logic and change the trip.rb logic