Rationalize and document the pocket api.