Issue #97: Use pattern matching on build_client_object instead of case statement