UnitTest round up

Minor bugfix (need to force gc for performance test if you run test.exe
in IDE),
minor tweaks