Adding a test for extending a request, and some light refactoring