Cleaned up RDF extraction code.