Moving mincen stuff out of miner and into sim.
Added this back for merge with master.