Refactor stats to use the same type for indexes