Move plugin code in executor to dispatcher