Refactor T_RATE, fixed the setup and fixes to T_TRADE.