Fix a number of broken tests, caused by prior refactorings
Remove most reflection warnings