Fixed C / C++ linkage and an inclusion conflict. Small clean-ups.