more cleanup. c api compatibility toggle