Fixed compilation errors due to initial blind-coding

Next up: actual runtime testing.
I expect some bugs, but once working it will confirm that all of the include library functions work properly.