Add middleware support via stack/stack