unify some more; add cffi tests