Merge "detect api version, and start respecting offsets" into pi-dev