Converted the fix_* and group_stats scripts to PDO