Relocated create_index call to where it belongs, instead of creating a new object in __main__