Fix uniqueness condition in Index
Make get_*_data functions in to magic functions