ticket.rb code clean-up