Refactored Client