Adds middleware abstract, and associated test, and calls.
Merge pull request #16 from phavour/feature-middleware-abstract

Adds middleware abstract, and associated test, and calls.