Some cleanups in report and valtab scripts