Move nif functions to geef_nif
Introduce geef_index