Added serveWJsMiddleware and tests