Minor improvements to tests - merge from TestFramework
Fix tests after merge