Adding index to measurement_origins and removing unused factory