Also includes tests for #24. On the one hand - it is only optimization, not requirement, but as it affects API it is fair to have API stability regression, especially that is not only internal contract communication (exiting market in particular). However I didn't include any perf tests, so it is not testing if the optimization actually optimizes (but it is really how level obvious at some point it would pay of).
Closes #25
Also includes tests for #24. On the one hand - it is only optimization, not requirement, but as it affects API it is fair to have API stability regression, especially that is not only internal contract communication (exiting market in particular). However I didn't include any perf tests, so it is not testing if the optimization actually optimizes (but it is really how level obvious at some point it would pay of).