Implemented sendToProduction flag and cleaned up output.