Initial port of David's original REST SDK.