use local function namespace for tidy model definitions. Added MAP initilizers