Merged icmc.py from modeldev branch