added middleware handler
context
added tests for midleware module
added midleware test to handler
mad a bad
Merge pull request #38 from hayes/middleware

added middleware handler