Refactor of tickets table.