Code cleanup for channel_report.sh