Compile as Middleware

I've added the ability to run as middleware.  Updated the README accordingly.