Performance testing preparation
Bugfixes for the last few commits