Created refactored client file