edited diverse headers to add cpp compatibility