Improved the to_production script