Refactor display_ticket_replies()

It is now converted to loop instead of twice duplication of everything