merge
merge
merge some more patches from features/type_checking...

...to make unit tests and Ole happy.