Some of the code around ticket updating is quite complex and could use a refactor, better sooner rather than later.