More changes based on PR feedback: https://github.com/yahoo/mojito/pull/1101
Updated middleware execution at run time based on PR#1101 feedback.