Fix gross_profit.py, commonify and add elementwise grouping to report