Add some typing and (mostly) fixed the dynamic loading of C code.
Trying to handle integral sizes properly.