Refactored RestClient class to use explicit types and removed unused methods