Move Index to cffi

This commit gives us feature-parity with the version in C.