Make the client-side API code a little cleaner