cleaned up some messyness in advanced trader.