Remove unused functions, add subsampling for index frequency tally