Cleaned up some more code and confirmed that the links in the C and C++ versions match.