Middleware class finished