tradecontroller refactor