Support reference uri & fix gobs of C code

I'm starting to see how argv is used. Is a struct more useful here?