Please don't kill me, but I think we need some tests for this code.  At a minimum something that goes through the success path, but it would also be nice to trigger some of the error paths.