General purpose Monte Carlo code, without hiding anything under the carpet.