Add types to test_io, test_run, various other fixes
#2773
Merged
test_io, test_run, various other fixes
#2773