Fixes to function calls and variable declarations in the IR-based cross-compiler, and more comments.