I havent found a reference implementation yet. I'll do some more searching when I get back to SF so I can be sure I'm implementing this the "right" way.