Move plugins over to middlware-based dispatch