codegen: resolve functions/variable names better.