Adding concept of docRef, unifying the calling convention for mode controllers.
Adding support for HashMap apply and our custom tweak of mori with incubator utils.