Move request creation into a request factory class.