add ticket admin widget + refactor and clean ticket code