*sigh* everything implemented, but entirely untested. added entry point fn, gencode.