Unit test speed improvements

This should always be overridden by the testcases if needed.