Support reference uri & fix gobs of C code

There's got to be a way to do this without gotos? https://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF