Remove dependency on external C libraries.
Remove some more dependencies on external C stuff.