Refactor ticket viewing