Refactor a bit test code and move load tests in a separate profile. A few additional test cleanup.