Changed gene-level aggregation code to be more robust --- more similar to genesum code