Cleaned up the client request code.