Small improvements + additional test
Add dynamic programming approach to ListOfExpressionsFormatter - cache paratial results