Make sure Ticket class matches contract
Minor refactors