Add index and pass integration tests