Added debug mode and '--testing' to flip prod switch off.