Updated middleware code tpl and env cmd dep listing;