C run time work

This is a pull request for review currently, not for an actual merge.  It is for @housel and others to take a look at ...

I will update it over time and when it is ready for a merge, I will say so on here. :)