Refactoring T_TRADE statement generation 3

Some more comments added.
Starting to get a good view on what's going on.