Small refactoring and fixes for Request