trying to conform more to flux architecture. Also added recursive cell-opening