Client implementation, thanks to brunch.