Removed tasks from IMiddleware definition

Also registered them in pipeline