Added cffi and macro support