cleanup and warning suppression so that the only remaining warning (for now) are unused ffi functions.