Refactoring in how tickets is read from the database.