Fix some bugs with client usage and add utility methods.