Cffi core Code cleanup