Main file for indezing and util functions