Added some unit tests to the optimizer, fixed some bugs, made immutable objects for Trades and TradeSets