TTMaster/TTSlave/TTRole refactoring