Support reference uri & fix gobs of C code

Nice! that's way way better. Updating the code.