Added a Request class to handle common functionality.