This change also pays off some of the remaining technical debt with stdio, file descriptors, and memory managemnt polyfills.