Added luce_index.py, made luce.py flexible