Merging and fixing last changes by OP.
Merging OP changes.
Switching to BMMI models.